package com.qf.lanzhou.blog.api.service.impl.login;

import com.qf.lanzhou.blog.api.dao.AuditDao;
import com.qf.lanzhou.blog.api.dao.Impl.login.AuditDaoImpl;
import com.qf.lanzhou.blog.api.pojo.entity.Audit;
import com.qf.lanzhou.blog.api.service.AdminAuditService;

import java.util.ArrayList;
import java.util.List;

/**
 * @author LEON-HE
 */
public class AdminAuditServiceImpl implements AdminAuditService {
    private AuditDao auditDao = new AuditDaoImpl();
    @Override
    public List<Audit> getAuditList() {
        List<Audit> audits = new ArrayList<>();
        audits = auditDao.selectAll();
        if (audits==null){
            throw new RuntimeException("获取失败");
        }
        return audits;
    }
}
